<?php
  header('Content-Type:application/json; charset=UTF-8');
      session_start();
  if(isset($_SESSION['userflag'])){

    if (is_array($_POST)&&isset($_POST["type"])){
      $filename = $_POST["type"].'.json';
      if (file_exists($filename)){
        $json_string = file_get_contents($filename);
      }else{
        $json_string ="";
      }
    //$obj=json_decode($json_string,true);

    echo '{"status" :1 , "msg" :"","data":'.$json_string.'}';
    }
  }else{
      echo '{"status" :0 , "msg" :"未登陆"}';
  }
 

?>